package com.wxit.threadlocal.object;

import lombok.val;

/**
 * 堆中的java对象只有数据部分，对象中数据的含义，要结合方法区中的class才能明了
 */
public class Student {
    String name;
    int age;
    int score;

    public Student(String name, int age, int score) {
        this.name = name;
        this.age = age;
        this.score = score;
    }

    @Override
    public int hashCode() {
        return 5;
    }

    public static void main(String[] args) {
        var student = new Student("xiaohao", 23, 60);
        //这一串数字就是一个随机数  native
        System.out.println(student); //com.wxit.threadlocal.object.Student@b81eda8
    }
}
